package com.srx.openfeign.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * UserFeign接口
 * <p>用户与Elasticsearch服务之间的Feign接口</p>
 * @author 沈汝旭
 * @since 2025-10-18 10:54
 * @version 1.0
 */
@FeignClient(name = "elasticsearch-service", path = "/elasticsearch/user")
public interface UserToElasticsearch
{
	
	/**
	 * 根据账号获取用户ID
	 * @param account 账号
	 * @return 用户ID
	 */
	@GetMapping("/id/{account}")
    Long getUserIdByAccount(@PathVariable("account") String account);
	
	
	/**
	 * 根据邮箱获取用户ID
	 * @param email 邮箱
	 * @return 用户ID
	 */
	@GetMapping("/id/{email}")
    Long getUserIdByEmail(@PathVariable("email") String email);
	
}
